﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class ButtonClicked : MonoBehaviour {

	public bool state;
	public Button thisB;
	// Use this for initialization
	void Start () {
		state = false;
		thisB.image.color = (state) ? Color.red : Color.black;
	}

	public void SetState(bool newState) {
		state = newState;
		thisB.image.color = (state) ? Color.red : Color.black;
	}

	public void UpdateState() {
		state = !state;
		thisB.image.color = (state) ? Color.red : Color.black;
	}
}
